package com.easylinkin.linkappapi.iaqi.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.easylinkin.linkappapi.iaqi.entity.IaqiStatistic;
import com.easylinkin.linkappapi.iaqi.entity.vo.CountDaysVo;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;

/**
 * IiaqiStatistic表数据库访问层
 *
 * @author CodeGenerator
 * @date 2022/06/27
 */
public interface IaqiStatisticMapper extends BaseMapper<IaqiStatistic> {


    /**
     * 查询分页
     *
     * @param page             分页参数对象
     * @param appIaqiStatistic 过滤参数对象
     * @return 查询分页结果
     */
    IPage<IaqiStatistic> selectPage(Page page, @Param("appIaqiStatistic") IaqiStatistic appIaqiStatistic);

    /**
     * 查询单条
     *
     * @param id 主键id
     * @return 查询结果
     */
    IaqiStatistic getOneById(@Param("id") Serializable id);

    /**
     * 空气污染根据等级分组统计
     *
     * @param countDaysVo
     * @return
     */
    List<CountDaysVo> countDaysGroupByLevel(@Param("countDaysVo") CountDaysVo countDaysVo);
}

